package com.day6.test13_niming_and_lambda;

/**
 * @author 小坡
 * @date 2022/9/8  17:02
 **/
public class Test {
    public static void main(String[] args) {
        useInter(new Inter() {
            @Override
            public void show() {
                System.out.println("匿名内部类执行了");
            }
        });
        useInter(() -> System.out.println("lambda执行了"));
    }

    public static void useInter(Inter inter) {
        inter.show();
    }
}

interface Inter {
    void show();
}